package com.baitai.web.test;

import com.baitai.common.core.domain.AjaxResult;
import com.baitai.common.utils.CommonUtils;
import com.baitai.common.utils.SecurityUtils;
import com.baitai.common.utils.StringUtils;
import com.baitai.system.domain.vo.Express100DTO;
import com.google.gson.Gson;
import com.kuaidi100.sdk.api.QueryTrack;
import com.kuaidi100.sdk.core.IBaseClient;
import com.kuaidi100.sdk.pojo.HttpResult;
import com.kuaidi100.sdk.request.QueryTrackParam;
import com.kuaidi100.sdk.request.QueryTrackReq;
import com.kuaidi100.sdk.utils.SignUtils;

import java.util.Arrays;
import java.util.Random;

public class test {

    public static void main(String[] args) {
//        String key = "YScMpPOi8823";
//        String customer = "C7270406105CB146A7BB828CDCCD75F5";
//        String tplCode = "yunda";
//        String orderId = "434054197086702";
//        Express100DTO response = null;
//        try {
//            QueryTrackReq queryTrackReq = new QueryTrackReq();
//            QueryTrackParam queryTrackParam = new QueryTrackParam();
//            queryTrackParam.setCom(tplCode);
//            queryTrackParam.setNum(orderId);
//            String param = new Gson().toJson(queryTrackParam);
//
//            queryTrackReq.setParam(param);
//            queryTrackReq.setCustomer(customer);
//            queryTrackReq.setSign(SignUtils.querySign(param ,key,customer));
//
//            IBaseClient baseClient = new QueryTrack();
//            HttpResult execute = baseClient.execute(queryTrackReq);
//            // 对返回的数据进行反序列化处理
//            Gson gson = new Gson();
//            String responseBody = execute.getBody();
//            response = gson.fromJson(responseBody, Express100DTO.class);
//        } catch (Exception e) {
//            e.printStackTrace();
//        }
//        assert response != null;
//        System.out.println(response.getData());

        // 创建一个Random对象
//        String fileUrl = "/profile/upload/2024/07/24/234234243_20240724084508A004.jpg";
//        fileUrl = fileUrl.substring(fileUrl.indexOf("/")+1);
////        String[] split = fileUrl.split("/");
////        System.out.println(split[split.length - 1]);
//        System.out.println(fileUrl.substring(fileUrl.indexOf("/")));

//        System.out.println(SecurityUtils.matchesPassword("123456","$2a$10$WW728UTReWHS/5FjtS0YgOYiP6Pkk2ZI3uX6sHmcPtDEH9teamT5S"));
//        String result = "";
//        if(StringUtils.isNotEmpty(result)){
//            System.out.println("1111111111");
//        }

        String a = "插屏";
        System.out.println(a.substring(0,2));


    }

}
